<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="/static/css/dynamic.css" rel="stylesheet" type="text/css" />
    <title>动态标注</title>
</head>
<body>
    <div class="top-bg">
        <div class="subtitle">动态标注</div>
        <div class="form-container">
            <form method="post" action="/dynamicTag/">
                {% csrf_token %}
                <textarea maxlength="500" cols="50" rows="10" name="userInput" placeholder="请输入一段中文的话"></textarea>
                <input type="submit" value="分析"  name="submit" />
                <input type="reset" value="重置"  name="reset" />
            </form>
        </div>
    </div>
    {% if tag == "ok" %}
    <div class="subsubtitle">命名实体识别</div>
    <div class="tag-word-container">
        <p>粉色:人名(nr), 绿色:地名(ns), 橘色:名词(n)</p>
            <p class="tag-word">
            {% for line in lst %}
                {% if line.1 == "n" %}
                    <span style="color:#ffff;background-color:orange;float:left;width:auto">{{ line.0 }}</span>
                    {% elif line.1 == "ns"%}
                    <span style="color:#ffff;background-color:green;float:left;width:auto">{{ line.0 }}</span>
                    {% elif line.1 == "nr"%}
                    <span style="color:#ffff;background-color:deeppink;float:left;width:auto">{{ line.0 }}</span>
                    {% else %}
                    <span style="float:left;width:auto">{{ line.0 }}</span>
                {% endif %}
            {% endfor %}
        </p>
    </div>
    <div id="data_img_1">
        <iframe frameborder=0 src="show_charts" width="100%" height="850"></iframe>
    </div>
    {% endif %}
</body>
</html>